<template>
  <div class="tips ct cc">
    <img v-if="icon == 'success'" src="@/assets/img/success.png" />
    <img v-if="icon == 'fail'" src="@/assets/img/fail.png" />
    <img v-if="icon == 'error'" src="@/assets/img/error.png" />
    <p class="f14">{{ msg }}</p>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "v-tips",
  props: {
    icon: {
      type: String,
      default: "success",
    },
    msg: {
      type: String,
      default: "成功",
    },
  },
});
</script>

<style lang="scss" scoped>
.tips {
  min-height: calc(100vh - 100px);

  img {
    width: 1.28rem;
    height: 1.28rem;
    margin: 0 auto;
  }

  p {
    margin: 0.5rem 0.2rem;
  }
}
</style>